The present invention relates to a data processing technique, and in particular, to a technique especially effective when applied to an instruction format in a system of a program control type, for example, to a technique effectively applicable to a configuration method of a two-operand instruction using two operands at execution of an instruction.
Conventionally, a set of microinstructions of the microprocessors such as HD68000 produced by Hitachi Ltd. is classified into three kinds of instruction formats: (1) no-operand instruction (for which no operand is required), (2) one-operand instruction, and (3) 2-operand instruction.
FIG. 2 is a schematic diagram illustrating the configuration of the 2-operand instruction.
Namely, a 2-operand instruction comprises an operation code field OP, a size field Sz specifying the operand size (bit length such as 8, 16, or 32 bits), source side operand Dn, and an effective address field EA2 indicating the operand location on the destination side. (Refer to "Hitachi Microcomputer, Semiconductor Data Book, 8/16 Bit Microcomputer", pp. 945-952; Hitachi, Ltd.; Sep. 1982.) As described above, the two-operand instruction of the conventional microprocessors of the HD6800 family has only one size field Sz. In this case, for example, an addition instruction specified in mnemonic codes as ADD Do, x cannot be executed if the source operand Do and the destination operand x are not of the same bit length. Consequently, to execute the ADD operation with the size of the source operand Do set to 8 bits and with the size of the destination operand x set to 32 bits, an adjusting instruction is required to preliminarily adjust the size of the source operand Do from 8 bits to 32 bits. Namely, an instruction which adds three bytes of "0" to the 8-bit operand as the first portion thereof must be executed before the ADD operation is implemented.
As a result, the number of steps of a macro program is increased. In addition, to store an operand (in a case of the 8-bit length) for which only one byte is required, a memory area equivalent to two words becomes necessary. Consequently, the execution speed of a program is lowered depending on the instruction format; moreover, we have found that the memory utilization ratio is also deteriorated.